/*
 * @(#)Cost.java 1.50 04/04/14
 * 
 * Clase Compartida
 * PROP Grupo 13 Cluster 3
 */

/**
 * Esta clase implementa el tipo de datos Cost 
 * 
 * @author Anna Lopez Mora
 */

package dominio;

public class Cost implements Comparable {
	public Integer id;
	public Integer cost;
	

	public Cost(int _id, int _cost) {
		this.id = _id;
		this.cost = _cost;
	}
	public Integer GetId(){
		return this.id;
	}

	public void SetId(Integer id) {
		this.id = id;
	}
	public void SetCost(Integer cost) {
		this.cost = cost;
	}
	public Integer GetCost(){
		return this.cost;
	}
	
	public void PrintCost(){
		System.out.println("    [id:"+this.id+"]="+this.cost+" ");
	}
	@Override
	public int compareTo(Object o) {
		Cost e = (Cost)o;
		if(this.cost == e.cost) return 0;
		else if(this.cost > e.cost) return 1;
		else return -1;
	}
	
}